Getting access to the previous object

This is probably an easy question.. I have a set of requirements in the form:

obj1 (DOORS HEADING NUMBER) (REQUIREMENTS ID)
obj2 (REQUIREMENTS TEXT)
obj3 (DOORS HEADING NUMBER) (REQUIREMENTS ID)
obj4 (REQUIREMENTS TEXT)
...
...
etc.

so in other words:

3.2 REQID1
The system shall...bla..bla..
3.3 REQID2
The system shall cover ..bla..bla..

I've marked obj 2,4 as requirements in an attribute and now am writing a script for every requirement I want to get (REQUIREMENTS ID). If I have access to obj 2,4 how do I get access to the previous object so I can read the req ID?
lsand - Thu Feb 10 19:29:06 EST 2011

Re: Getting access to the previous object
SystemAdmin - Thu Feb 10 20:37:33 EST 2011

I'm assuming here that when you say "the previous object" you are referring always to the object that has the heading and not another previous object with requirements text.

If this is the case, the DOORS terminology for the heading object is known as a Parent object to the child objects that contain requirements text. The Module explorer on the LH side of a module that displays the tree structure of the objects gives you an idea of what objects are Parents, Children, Siblings, Leafs and so on.

So if your script is currently working on obj2, the relative parent to obj2 is obj1 - the DXL function your looking for is shown below. Once you have a handle on that Parent object you can get it's UID.
 

Object parent(Object o)

 


For more info about DXL functions to navigate through the object structure of a module, refer to section Objects > Navigation from an object in the DXL reference manual that can be found under the Help menu of the DOORS Explorer or Help menu in any currently opened module.

 

 


Paul Miller
Melbourne, Australia

 

Re: Getting access to the previous object
lsand - Fri Feb 11 13:08:50 EST 2011

SystemAdmin - Thu Feb 10 20:37:33 EST 2011

I'm assuming here that when you say "the previous object" you are referring always to the object that has the heading and not another previous object with requirements text.

If this is the case, the DOORS terminology for the heading object is known as a Parent object to the child objects that contain requirements text. The Module explorer on the LH side of a module that displays the tree structure of the objects gives you an idea of what objects are Parents, Children, Siblings, Leafs and so on.

So if your script is currently working on obj2, the relative parent to obj2 is obj1 - the DXL function your looking for is shown below. Once you have a handle on that Parent object you can get it's UID.
 

Object parent(Object o)

 


For more info about DXL functions to navigate through the object structure of a module, refer to section Objects > Navigation from an object in the DXL reference manual that can be found under the Help menu of the DOORS Explorer or Help menu in any currently opened module.

 

 


Paul Miller
Melbourne, Australia

 

Thank you!! I had looked parent up in the Index tab from the DXL Reference and didn't find it there but found it under the search tab.

Re: Getting access to the previous object
llandale - Fri Feb 11 16:28:25 EST 2011

See section "Navigation from an object" in chapter "Objects" in the DXL manual. Understand those command all respect the current display set, you will usually want to load the "Standard view" first to make sure what you see is what you want.

  • Louie